Home:ALL Converter>How to Convert Bitmap to "YUV_420_888" format?

How to Convert Bitmap to "YUV_420_888" format?

Ask Time:2020-08-25T09:13:06         Author:Trax

Json Formatter

I have a bitmap and i want to process this bitmap with ML-kit face recognition. When I give this bitmap directly to ML kit i see this message : "StreamingFormatChecker: ML Kit has detected that you seem to pass camera frames to the detector as a Bitmap object. This is inefficient. Please use YUV_420_888 format for camera2 API or NV21 format for (legacy) camera API and directly pass down the byte array to ML Kit."

So my question is how can I convert a bitmap to "YUV_420_888" format?

Author:Trax,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63570682/how-to-convert-bitmap-to-yuv-420-888-format
yy